//*********************************************************************
// Copyright (C) 2014 Hell Prototypes / www.hellprototypes.com
// 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
//********************************************************************
#ifndef PCF8563_DEFS_H_
#define PCF8563_DEFS_H_

// I2C addresses
#define PCF8563I2C_W			0b10100010
#define PCF8563I2C_R			0b10100011

// Control register
#define PCF8563ADDR_CTRL_1		0x00
#define PCF8563ADDR_CTRL_2		0x01

// Time registers
#define PCF8563ADDR_SECS			0x02
#define PCF8563ADDR_MINS			0x03
#define PCF8563ADDR_HRS			0x04
#define PCF8563ADDR_DATE			0x05
#define PCF8563ADDR_DAY			0x06
#define PCF8563ADDR_MONTH			0x07
#define PCF8563ADDR_YEAR			0x08

// Alarm 1 registers
#define PCF8563ADDR_ALARM1_MINS	0x09
#define PCF8563ADDR_ALARM1_HRS	0x0A
#define PCF8563ADDR_ALARM1_DATE	0x0B
#define PCF8563ADDR_ALARM1_DAY	0x0C

// Other registers
#define PCF8563ADDR_CLKOUT_CTRL	0x0D
#define PCF8563ADDR_TIMER_CTRL	0x0E
#define PCF8563ADDR_TIMER			0x0F

#endif /* PCF8563_DEFS_H_ */